API Documentation
Public Member Functions | Static Public Attributes | List of all members
nkGraphics::RenderQueueManager Class Referencefinal

Manages the render queues available in the component. More...

Inheritance diagram for nkGraphics::RenderQueueManager:

Public Member Functions

 ~RenderQueueManager ()
 
RenderQueuecreateOrRetrieve (const nkMemory::StringView &name)
 
RenderQueueget (const nkMemory::StringView &name) const
 
RenderQueuegetByIndex (unsigned int index) const
 
void rename (const nkMemory::StringView &oldName, const nkMemory::StringView &newName)
 
void erase (const nkMemory::StringView &name)
 

Static Public Attributes

static const nkMemory::StringView DEFAULT_RENDER_QUEUE = "NILKINS_DEFAULT_RENDER_QUEUE"
 Name of the default base render queue of the component. This queue is used by default by all passes or resources requiring a queue.
 

Detailed Description

Manages the render queues available in the component.

The manager owns the memory it allocates. External code should not delete it.

Constructor & Destructor Documentation

◆ ~RenderQueueManager()

nkGraphics::RenderQueueManager::~RenderQueueManager ( )

Destructor.

Member Function Documentation

◆ createOrRetrieve()

RenderQueue* nkGraphics::RenderQueueManager::createOrRetrieve ( const nkMemory::StringView name)

Creates if unavailable, or retrieves if available, a render queue.

Parameters
nameThe name of the queue to retrieve.
Returns
The queue requested, possibly freshly created. The manager owns the memory allocated, external code should not delete it. See erase().

◆ get()

RenderQueue* nkGraphics::RenderQueueManager::get ( const nkMemory::StringView name) const

Retrieves a queue.

Parameters
nameThe name of the queue to retrieve.
Returns
The queue requested if available, nullptr else.

◆ getByIndex()

RenderQueue* nkGraphics::RenderQueueManager::getByIndex ( unsigned int  index) const

Retrieves a render queue given an index. Note that as the internal memory is changed, an index can map to different resources over different calls. Mainly used to loop over all queues in one go.

Parameters
indexThe index of the queue to retrieve.
Returns
The queue requested if available, nullptr else.
Remarks
Render queues for which setHidden(true) has been called won't be visible through this accessor.

◆ rename()

void nkGraphics::RenderQueueManager::rename ( const nkMemory::StringView oldName,
const nkMemory::StringView newName 
)

Renames a queue, changing both its name and the way to access it within the manager.

Parameters
oldNameThe name of the queue to change.
newNameThe name to rename it to.

◆ erase()

void nkGraphics::RenderQueueManager::erase ( const nkMemory::StringView name)

Erases and frees the memory of a render queue.

Parameters
nameThe name of the render queue to erase.

The documentation for this class was generated from the following file: